-- GENERATED SPELL FOR [Jin'Zallah the Sandbringer] --


function spell0_8200(pUnit, Event) --@Dust Cloud,Self--
pUnit:FullCastSpellOnTarget(7272,pUnit)
pUnit:RegisterEvent('Sorts_8200', 12324, 1)
end

function spell1_8200(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8200', 3000, 1)
end

function spell2_8200(pUnit, Event) --@Sand Storms,n/a--
pUnit:FullCastSpellOnTarget(10132,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8200', 30252, 1)
end

function Sorts_8200(pUnit, Event)
local choix_sorts_8200 = math.random(0, 2)
if choix_sorts_8200 == 0 then
pUnit:RegisterEvent('spell0_8200', 1, 1)
end
if choix_sorts_8200 == 1 then
pUnit:RegisterEvent('spell1_8200', 1, 1)
end
if choix_sorts_8200 == 2 then
pUnit:RegisterEvent('spell2_8200', 1, 1)
end
end

function mob8200_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8200', math.random(1500, 3000), 1)
end

function mob8200_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8200_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8200_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8200, 1, 'mob8200_Action')
RegisterUnitEvent(8200, 2, 'mob8200_Leave')
RegisterUnitEvent(8200, 3, 'mob8200_Kill')
RegisterUnitEvent(8200, 4, 'mob8200_Die')
